import React from 'react'
import Link from 'next/link'

const links = [
  { href: '/', label: 'home' }
].map(link => ({
  ...link,
  key: `nav-link-${link.href}-${link.label}`,
}))

const Nav = () => (
  <nav>
    <ul>
      {links.map(({ key, href, label }) => (
        <li key={key}>
          <Link href={href}><a>{label}</a></Link>
        </li>
      ))}
    </ul>
  </nav>
)

export default Nav
